import React, { PureComponent } from 'react';
import { Balloon } from '@teamix/ui';
import TagForFeature from 'components/tagForFeature';
import './index.scss';
import intl from '../../locale';

export default class ProTag extends PureComponent {
  render() {
    const { planType } = this.props;
    const trigger = (
      <TagForFeature
        size="small"
        color="wealthyGold"
        prefix="yx-"
        style={{ marginLeft: 8 }}
        tagText="PRO"
      />
    );
    //  !== 'premiumVersion'
    return planType ? (
      <Balloon.Tooltip align="t" trigger={trigger}>
        {/* 高级版专属功能，2021.8.1 前限时免费使用 */}
        {intl.get({
          id: 'code-assets.components.proTag.AdvancedEditionExclusiveFeatures',
          defaultMessage: '高级版专属功能',
        })}
      </Balloon.Tooltip>
    ) : (
      trigger
    );
  }
}
